#ifndef CAMINO_H_
#define CAMINO_H_


#include <iostream>
#include "string.h"
#include "Bonus.h"
#include "PuntoDeGrilla.h"
#include "ElementoIncompletoException.h"


using namespace std;

class Camino : public PuntoDeGrilla {
	
private:

	Bonus* bonus;

public:

	Camino(): PuntoDeGrilla(0,0){
		this->bonus = new Bonus("comida");
		this->setNombreClase("Camino");
	}

	~Camino(){
		delete bonus;
	}

	bool tieneBonus(){
		return (this->bonus->getTipo()!="");

	}

		/****GETERS****/

	int getFila(){
		return this->fila;
	}

	int getColumna(){
		return this->columna;
	}
	
	Bonus* getBonus(){
		return this->bonus;
	}
	
	/****SETERS****/

	void setFila(int f){
		this->fila = f;
	}
	
	void setColumna(int c){
		this->columna = c;
	}

	void setBonus(Bonus* b) throw(...) {
		if(b->getTipo()!=""){
		this->bonus = b;
		}
		else{
			throw new ElementoIncompletoException();
		}
	}

	void agregarObjeto(ObjetoModelo* om) throw(...) {
		if(om->getNombreClase()=="Bonus"){
			this->setBonus((Bonus*)om);
		}
		else{
			throw new AtributoDesconocidoException(om->getNombreClase());
		}
	}
};

#endif 